<h1>New order</h1>

<% form_for(@order) do |f| %>
  <%= f.error_messages %>

  <p>
    销售订单号<br />
    <%= f.text_field :order_num %>
  </p>
  <p>
    请选择客户<br />
    <%= select "order","customer", Customer.find(:all).collect {|c| 
      [c.customer, c.customer]}, {:include_bank => true
    } %>
  </p>
  <p>
    订单生成日期<br />
    <%= f.date_select :created_at,:use_month_numbers=>true %>
  </p>
  <p>
    应到金额(USD) <br />
    <%= f.text_field :sumusd_sh %>
  </p>
  <p>
    实到金额(USD)<br />
    <%= f.text_field :sumusd_re %>
  </p>
  <p>
    付款方式><br />
    <%= select_payment %>
    <!--
    <select name="order[payment]"> 
      <option value="西联汇款" selected="selected">西联汇款</option> 
      <option value="银行汇款">银行汇款</option> 
      <option value="现金支付RMB">现金支付RMB</option> 
      <option value="现金支付USD">现金支付USD</option> 
    </select>
    -->
  </p>
  <p>
    折合人民币(RMB)<br />
    <%= f.text_field :sum_rmb %>
  </p>
  <p>
    <%= f.label :aim_area %><br />
    <%= f.text_field :aim_area %>
  </p>
  <p>
    <%= f.label :req_lang %><br />
    <%= f.text_field :req_lang %>
  </p>
  <p>
    <%= f.label :req_band %><br />
    <%= f.text_field :req_band %>
  </p>
  <p>
    <%= f.label :req_manual %><br />
    <%= f.text_field :req_manual %>
  </p>
  <p>
    <%= f.label :req_charge %><br />
    <%= f.text_field :req_charge %>
  </p>
  <p>
    <%= f.label :delv_plan %><br />
    <%= f.text_field :delv_plan %>
  </p>
  <p>
    <%= f.label :delv_real %><br />
    <%= f.text_field :delv_real %>
  </p>
  <p>
    <%= f.label :track_num %><br />
    <%= f.text_field :track_num %>
  </p>
  <p>
    <%= f.label :sales %><br />
    <%= f.text_field :sales %>
  </p>
  <p>
    <%= f.label :profit %><br />
    <%= f.text_field :profit %>
  </p>
  <p>
    <%= f.label :status %><br />
    <%= f.text_field :status %>
  </p>
  <p>
    <%= f.label :user %><br />
    <%= session[:user].name %>
  </p>
  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', orders_path %>
